package com.yaoxuguang.concurrence.wait_notify.notify;

import javax.sound.midi.Soundbank;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.wait_notify.notify
 * @Description: 通知方法--notify()
 * @date 2018年12月21日17:26
 */
public class ThreadNotify extends Thread{
    private Object object;

    public ThreadNotify(Object object) {
        this.object = object;
    }

    @Override
    public void run() {
        synchronized (object){
            System.out.println("通知方法开始...");
            object.notify();
            System.out.println("通知方法结束...");
        }
    }
}
